import Vue from 'vue'
import Router from 'vue-router'
import search from '@/page/home/search'
import detail from '@/page/home/detail'
import index from '@/page/home/index'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      component: index
    },
    {
      path: '/search',
      name: 'search',
      component: search
    },
    {
      path: '/detail',
      name: 'detail',
      component: detail
    },
    {
      path: '/vuex', // 路由懒加载
      component: resolve => require(['@/page/vuex'], resolve)
    }
  ]
})
